package com.qiang.demo01;

import java.util.Iterator;
import java.util.TreeSet;

public class Test05 {
    public static void main(String[] args) {
        TreeSet<String> ts = new TreeSet<>();
        ts.add("qwe");
        ts.add("asd");
        ts.add("dfg");
        ts.add("wet");
        Iterator<String> it = ts.iterator();
        while (it.hasNext()) {
            String next = it.next();
            System.out.println(next);
        }
    }
}
